namespace _RobotInspection.DTO
{
    public class UserDto
    {
        public UserDto()
        {

        }

        /// <summary>
        /// Desc:序号
        /// </summary>           
        public long Id { get; set; }

        /// <summary>
        /// Desc:登录名
        /// </summary>           
        public string UserName { get; set; }

        /// <summary>
        /// Desc:姓名
        /// </summary>           
        public string RealName { get; set; }

        /// <summary>
        /// Desc:权限
        /// </summary>           
        public byte Role { get; set; }

        /// <summary>
        /// Desc:状态：1-启用，0-禁用
        /// Default:1
        /// Nullable:True
        /// </summary>           
        public byte Status { get; set; } = 1;

        /// <summary>
        /// Desc:注册时间
        /// </summary>           
        public DateTime? RegisterTime { get; set; }

        /// <summary>
        /// Desc:最后登录时间
        /// </summary>           
        public DateTime? LastLoginTime { get; set; }
    }

    /// <summary>
    /// user查询数据结构
    /// </summary>
    public class UserInsertDto
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public UserInsertDto()
        {

        }
        public string UserName { get; set; }
        public string UserPassword { get; set; }
        public string RealName { get; set; }
        public string? Phone { get; set; }
        public string? Email { get; set; }
        public byte? Permission { get; set; }
        public byte? Status { get; set; }
    }

    /// <summary>
    /// user分页查询数据结构
    /// </summary>
    public class UserPagedQueryDto
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public UserPagedQueryDto()
        {

        }

        /// <summary>
        /// 真名（可模糊查询）
        /// </summary>           
        public string? RealName { get; set; }

        /// <summary>
        /// 用户权限
        /// </summary>
        public byte? Role { get; set; }

        /// <summary>
        /// 用户状态
        /// </summary>
        public byte? Status { get; set; }

        /// <summary>
        /// 分页页码
        /// </summary>
        public int PageIndex { get; set; }

        /// <summary>
        /// 分页大小
        /// </summary>
        public int PageSize { get; set; }
    }


    /// <summary>
    /// 用户分页结果数据结构
    /// </summary>
    public class UserPagedResultDto
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public UserPagedResultDto()
        {

        }

        /// <summary>
        /// UserDto的列表
        /// </summary>
        public List<UserDto> UserDtoList { get; set; } = [];

        /// <summary>
        /// 总记录数
        /// </summary>
        public int TotalCount { get; set; }

        /// <summary>
        /// 总页数
        /// </summary>
        public int TotalPages { get; set; }

        /// <summary>
        /// 当前页码
        /// </summary>
        public int CurrentPage { get; set; }

        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 是否有上一页
        /// </summary>
        public bool HasPreviousPage { get; set; }

        /// <summary>
        /// 是否有下一页
        /// </summary>
        public bool HasNextPage { get; set; }
    }

    
}